
#ifndef _TIMER_H_
#define _TIMER_H_

#include <uw_types.h>
#include "port.h"

#define TIMER0_PT0_COUNT 1000 //  1ms  ; 10000     // 1MHz clock 10ms timer
#define os_timer_is_expired_for_time(timer, ref_timer) (((timer) < (ref_timer)) ? TRUE : FALSE)

__inline uint32_t os_timer_get_current_tick(void);
extern void timer_timer0_pt0_init(void);
extern void RAM_CODE timer_timer0_pt0_swi(void);
extern uint64_t os_get_tick_counter(void);
DRAM_CODE extern void critical_path_handler(void);
void os_tick_delay(uint32_t count);
void compute_cpu_speed(void);
void timer_polling_handler(uint32_t step);
void timer_clear_watch_dog(void);
int os_timer_is_pending(os_timer_h timer_h);
DRAM_CODE void sniff_enable_timer0_pt0(void);
void sniff_tick_counter(void);

#endif // _TIMER_H_

//EOF
